package com.jdeng.dubbo.service;

import com.jdeng.dubbo.bean.User;

public class UserServiceImpl implements UserService {
    Integer port;

    public UserServiceImpl(Integer port) {
        this.port = port;
    }

    @Override
    public User getUser(Integer id) {
        User user = mockUser(id);
        user.setDesc("服务端口："+port);
        return user;
    }

    static User mockUser(Integer id) {
        User user = new User();
        user.setId(id);
        user.setName("luban uncle");
        user.setBirthday("1998");
        user.setAge(18);

        return user;
    }

}
